
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.EmpWorkCalendar;
import com.cmc.dao.EmpWorkCalendarDao;
import com.cmc.service.EmpWorkCalendarManager;
/*
* @aegis.mapping
*/
public class EmpWorkCalendarManagerImpl extends BaseManager implements EmpWorkCalendarManager {
    private EmpWorkCalendarDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setEmpWorkCalendarDao(EmpWorkCalendarDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.EmpWorkCalendarManager#getEmpWorkCalendars(com.cmc.model.EmpWorkCalendar)
     */
    public List getEmpWorkCalendars(final EmpWorkCalendar empWorkCalendar) {
        return dao.getEmpWorkCalendars(empWorkCalendar);
    }

    /**
     * @see com.cmc.service.EmpWorkCalendarManager#getEmpWorkCalendar(String id)
     */
    public EmpWorkCalendar getEmpWorkCalendar(final String id) {
        return dao.getEmpWorkCalendar(new Long(id));
    }

    /**
     * @see com.cmc.service.EmpWorkCalendarManager#saveEmpWorkCalendar(EmpWorkCalendar empWorkCalendar)
     */
    public void saveEmpWorkCalendar(EmpWorkCalendar empWorkCalendar) {
        dao.saveEmpWorkCalendar(empWorkCalendar);
    }

    /**
     * @see com.cmc.service.EmpWorkCalendarManager#removeEmpWorkCalendar(String id)
     */
    public void removeEmpWorkCalendar(final String id) {
        dao.removeEmpWorkCalendar(new Long(id));
    }
    
    public List getEmpWorkCalendarsByStartEndDateWorkTypeId(final String empno, final String startdate, final String enddate, final String worktypeid)
    {
    	return dao.getEmpWorkCalendarsByStartEndDateWorkTypeId(empno, startdate, enddate, worktypeid);
    }
 
    public List getEmpWorkCalendarsByStartEndDate(final String empno, final String startdate, final String enddate)
    {
    	return dao.getEmpWorkCalendarsByStartEndDate(empno, startdate, enddate);
    }

}
